from http import client
import requests
import json

# rsp = requests.get("http://127.0.0.1:8003/?a=1&b=2")
# print(rsp.text)

class Client:
    def __init__(self, url: str) -> None:
        self.url = url
    
    def add(self, a: int, b: int) -> int:
        rsp = requests.get(f"{self.url}/?a={a}&b={b}")
        return json.loads(rsp.text).get("result", 0)

client = Client("http://127.0.0.1:8003")
print(client.add(1, 2))